package se.su.dsv.socialservice;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.os.RemoteException;
import android.widget.Toast;

public class SocialService extends Service {
	private int m_value = 0;

	private final ISocialService.Stub m_binder = new ISocialService.Stub(){

		@Override
		public int getValue() throws RemoteException {
			return m_value;
		}

		@Override
		public void setValue(int value) throws RemoteException {
			m_value = value;
		}
	};

	@Override
	public IBinder onBind(Intent intent) {
		return m_binder;
	}
	
	@Override
	public void onStart(Intent intent, int startId) {
		super.onStart(intent, startId);
		Toast.makeText(this, R.string.service_start, Toast.LENGTH_SHORT).show();
	}

	@Override
	public void onDestroy() {
		super.onDestroy();
		Toast.makeText(this, R.string.service_destroy, Toast.LENGTH_SHORT).show();
	}
}